Skip to content

chore(sponsored-feeds): use yaml format for the sponsored feed data for EVM #746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

nidhi-singh02
Copy link
Contributor

@nidhi-singh02 nidhi-singh02 commented Jul 14, 2025

Description

Use the same yaml format as defined in the deployments repository so it is easy to update when a price feed data changes.

Type of Change

  • New Page
  • Page update/improvement
  • Fix typo/grammar
  • Restructure/reorganize content
  • Update links/references
  • Other (please describe): Operational efficiency

Areas Affected

There is no change in the UI. It remains the same as before.
image

Checklist

  • I ran pre-commit run --all-files to check for linting errors
  • I have reviewed my changes for clarity and accuracy
  • All links are valid and working
  • Images (if any) are properly formatted and include alt text
  • Code examples (if any) are complete and functional
  • Content follows the established style guide
  • Changes are properly formatted in Markdown
  • Preview renders correctly in development environment

Related Issues

Closes #

Additional Notes

Contributor Information

  • Name:
  • Email:

Screenshots

Copy link

vercel bot commented Jul 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 6:57am
documentation ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 6:57am

@nidhi-singh02 nidhi-singh02 force-pushed the yaml-format-sponsored-feed branch from fdfcd9c to b731a07 Compare July 14, 2025 15:47
@nidhi-singh02 nidhi-singh02 added documentation Improvements or additions to documentation enhancement New feature or request and removed documentation Improvements or additions to documentation labels Jul 14, 2025
@nidhi-singh02 nidhi-singh02 self-assigned this Jul 14, 2025
@nidhi-singh02 nidhi-singh02 force-pushed the yaml-format-sponsored-feed branch from b731a07 to bc00d71 Compare July 15, 2025 06:43
Comment on lines +7 to +11
const networkImports = {
ethereum_mainnet: () =>
import(
"../pages/price-feeds/sponsored-feeds/data/evm/ethereum_mainnet.yaml"
),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping separate yaml files for each network, so it is easy to access/modify the data.

@@ -55,4 +55,4 @@ The addresses represent the price feed account for shard 0 of the relevant price
| FARTCOIN/USD | `2t8eUbYKjidMs3uSeYM9jXM9uudYZwGkSeTB4TKjmvnC` | `58cd29ef0e714c5affc44f269b2c1899a52da4169d7acc147b9da692e6953608` |
| ACRED/USD | `6gyQ2TKvvV1JB5oWDobndv6BLRWcJzeBNk9PLQ5uPQms` | `40ac3329933a6b5b65cf31496018c5764ac0567316146f7d0de00095886b480d` |
| WTI1M/USD | `nt1JuGVRBJNrvMpdZt9RJnxVSxRuoeVx5LRq3R1bS16` | `eca3fb7e6be5be55a01678ee00f6405b9e4986e32d539ccd2a06a57e0c615880` |
| PUMP/USD | `HMm3GPbdnqGwbkTnUUqCFsH8AMHDdEC3Lg8gcPD3HJSH` | `7a01fca212788bba7c5bf8c9efd576a8a722f070d2c17596ff7bb609b8d5c3b9` |
| PUMP/USD | `HMm3GPbdnqGwbkTnUUqCFsH8AMHDdEC3Lg8gcPD3HJSH` | `7a01fca212788bba7c5bf8c9efd576a8a722f070d2c17596ff7bb609b8d5c3b9` |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is unrelated to this PR, it is from precommit prettier for merged changes.

@nidhi-singh02 nidhi-singh02 marked this pull request as ready for review July 15, 2025 07:08
@aditya520 aditya520 self-requested a review July 15, 2025 13:46
priceDeviation: number;
}
// Import the data for each network. The data is in the form of a yaml file.
const networkImports = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than importing all networks here, can't you make a component which will take the yaml on run?

import { useState } from "react";
import copy from "copy-to-clipboard";

export const useCopyToClipboard = (timeout: number = 2000) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we abstract this method and use it with copyAddress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants